<?php
/*
	会员概况
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['htmls']=array();
	//今日新增
	$today_time=strtotime(date('Ymd'));
	$today['member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'createtime >'=>$today_time));
	$today['car_member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'type'=>2,'createtime >'=>$today_time));
	//昨日新增
	$yes_time=strtotime('-1 day');
	$yes_day['member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'createtime between'=>array($yes_time,$today_time)));
	$yes_day['car_member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'type'=>2,'createtime between'=>array($yes_time,$today_time)));
	//过去七天
	$yes7_time=strtotime('-7 days');
	$yes7_day['member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'createtime >'=>$yes7_time));
	$yes7_day['car_member']=pdo_count('jy_move_car_member',array('uniacid'=>$_SESSION['uniacid'],'type'=>2,'createtime >'=>$yes7_time));
	$return['htmls'][]=array('type'=>'data','one_num'=>4,'title'=>'新增会员/新增车主','datas'=>array(
		array('title'=>'今日新增','num'=>2,'data'=>array($today['member'],$today['car_member'])),
		array('title'=>'昨日新增','num'=>2,'data'=>array($yes_day['member'],$yes_day['car_member'])),
		array('title'=>'过去七天新增','num'=>2,'data'=>array($yes7_day['member'],$yes7_day['car_member'])),
		
	));
	//会员性别分布
	
	//地区分布
	exi($return);
}